//
//  GXSuggestModel.m
//  GxLanOuProject
//
//  Created by 甘霞 on 15/10/26.
//  Copyright © 2015年 甘霞. All rights reserved.
//

#import "GXSuggestModel.h"

@implementation GXSuggestModel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.suggest_id = value;
    }
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:self.title forKey:@"推荐标题"];
    [aCoder encodeObject:self.suggest_id forKey:@"推荐号"];
    [aCoder encodeObject:self.item_url forKey:@"详情网址"];
    [aCoder encodeObject:self.thumb forKey:@"推荐图片"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        self.title = [aDecoder decodeObjectForKey:@"推荐标题"];
        self.suggest_id = [aDecoder decodeObjectForKey:@"推荐号"];
        self.item_url = [aDecoder decodeObjectForKey:@"详情网址"];
        self.thumb = [aDecoder decodeObjectForKey:@"推荐图片"];
    }
    return self;
}

@end
